package controllerLayer;
import java.util.ArrayList;
import java.util.List;

import BDLayer.DBPerson;
import BDLayer.DBProEmployee;
import BDLayer.IFDBPerson;
import BDLayer.IFDBProEmployee;
import modelLayer.*;

public class PersonController {

	private IFDBPerson personDB = new DBPerson();
	private IFDBProEmployee proEmpDB = new DBProEmployee();
	




	public List<Person> getAllPersonByType(String type, boolean retriveAssociation){
		return personDB.getAllPersonByType(type, retriveAssociation);
	}

	public List<Person> insertPerson(List<String> list_p){
		List<Person> list_person = new ArrayList<Person>();

		
		for(int i = 0; i < list_p.size() ; i++ ){
			
				Person pObj = proEmpDB.getProEmpByInitital(list_p.get(i), false);					
				list_person.add(pObj);

			p("print String ="+ i + list_p.get(i) );
		}
		
		return list_person;
	}

	public void p(String e){System.out.println(e);}
}
